import http from '../request.js'

// 获取用户信息列表
let userGetList = (url, params) => {
    return http.req(
        'get',
        url = 'system/user/list',
        params,
        null
    )
}

// 获取用户信息详情
let userGetInfo = (url, userId) => {
    return http.req(
        'get',
        url = 'system/user/getInfo?userId='+userId,
        null,
        null
    )
}

// 添加用户信息
let userAdd = (url, data) => {
    return http.req(
        'post',
        url = 'system/user/create',
        null,
        data
    )
}

// 删除用户信息
let userRemove = (url, userId) => {
    return http.req(
        'delete',
        url = 'system/user/delete?userId=' + userId,
        null,
        null
    )
}

// 编辑用户信息
let userEdit = (url, data) => {
    return http.req(
        'put',
        url = 'system/user/update',
        null,
        data
    )
}

export default {
    userGetList,
    userGetInfo,
    userAdd,
    userRemove,
    userEdit
}